/*
 * To owl2 this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xowl.interpreter.frontends.functional;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Laurent WOUTERS
 */
public class ExpressionLoader {
    public static xowl.lang.owl2.Expression load(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.NodeID)
            return load_AnonymousIndividual(loader, (FNodeIDNode)node, context);
        if (node.getType() == FNodeType.Literal)
            return load_Literal(loader, (FLiteralNode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expContains)) return load_Contains(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValuesOf)) return load_ValuesOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Class expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectComplementOf)) return load_ObjectComplementOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectIntersectionOf)) return load_ObjectIntersectionOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectOneOf)) return load_ObjectOneOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectUnionOf)) return load_ObjectUnionOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataAllValuesFrom)) return load_DataAllValuesFrom(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataExactCardinality)) return load_DataExactCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataHasValue)) return load_DataHasValue(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMaxCardinality)) return load_DataMaxCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMinCardinality)) return load_DataMinCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataSomeValuesFrom)) return load_DataSomeValuesFrom(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectAllValuesFrom)) return load_ObjectAllValuesFrom(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectExactCardinality)) return load_ObjectExactCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasSelf)) return load_ObjectHasSelf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasValue)) return load_ObjectHasValue(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMaxCardinality)) return load_ObjectMaxCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMinCardinality)) return load_ObjectMinCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectSomeValuesFrom)) return load_ObjectSomeValuesFrom(loader, elemNode, context);
        // Datatype expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataComplementOf)) return load_DataComplementOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataIntersectionOf)) return load_DataIntersectionOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataOneOf)) return load_DataOneOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDatatypeRestriction)) return load_DatatypeRestriction(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataUnionOf)) return load_DataUnionOf(loader, elemNode, context);
        // Individual expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewIndividual)) return load_NewIndividual(loader, elemNode, context);
        // Literal expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expPlus)) return load_Plus(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMinus)) return load_Minus(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMult)) return load_Mult(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDivide)) return load_Divide(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expModulus)) return load_Modulus(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expAnd)) return load_BAnd(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expOr)) return load_BOr(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expXOr)) return load_BXOr(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expNot)) return load_BNot(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEqual)) return load_Equal(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDifferent)) return load_Different(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreater)) return load_Greater(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreaterEqual)) return load_GreaterEqual(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesser)) return load_Lesser(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesserEqual)) return load_LesserEqual(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expIRIOf)) return load_IRIOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLengthOf)) return load_LengthOf(loader, elemNode, context);
        // Object Property expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectInverseOf)) return load_ObjectInverseOf(loader, elemNode, context);
        // Executable expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expLambda)) return load_Lambda(loader, elemNode, context);
        // Array expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expArray)) return load_Array(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expConcat)) return load_Concat(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expSlice)) return load_Slice(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expNewObject)) return load_NewObject(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.EntityExpression loadEntityExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.ClassExpression loadClassExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Class expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectComplementOf)) return load_ObjectComplementOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectIntersectionOf)) return load_ObjectIntersectionOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectOneOf)) return load_ObjectOneOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectUnionOf)) return load_ObjectUnionOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataAllValuesFrom)) return load_DataAllValuesFrom(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataExactCardinality)) return load_DataExactCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataHasValue)) return load_DataHasValue(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMaxCardinality)) return load_DataMaxCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataMinCardinality)) return load_DataMinCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataSomeValuesFrom)) return load_DataSomeValuesFrom(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectAllValuesFrom)) return load_ObjectAllValuesFrom(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectExactCardinality)) return load_ObjectExactCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasSelf)) return load_ObjectHasSelf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectHasValue)) return load_ObjectHasValue(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMaxCardinality)) return load_ObjectMaxCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectMinCardinality)) return load_ObjectMinCardinality(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectSomeValuesFrom)) return load_ObjectSomeValuesFrom(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.Datarange loadDatarangeExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Datatype expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataComplementOf)) return load_DataComplementOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataIntersectionOf)) return load_DataIntersectionOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataOneOf)) return load_DataOneOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDatatypeRestriction)) return load_DatatypeRestriction(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expDataUnionOf)) return load_DataUnionOf(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.IndividualExpression loadIndividualExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.NodeID)
            return load_AnonymousIndividual(loader, (FNodeIDNode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Individual expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewIndividual)) return load_NewIndividual(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.LiteralExpression loadLiteralExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.Literal)
            return load_Literal(loader, (FLiteralNode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expContains)) return load_Contains(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Literal expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expPlus)) return load_Plus(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMinus)) return load_Minus(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expMult)) return load_Mult(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDivide)) return load_Divide(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expModulus)) return load_Modulus(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expAnd)) return load_BAnd(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expOr)) return load_BOr(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expXOr)) return load_BXOr(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expNot)) return load_BNot(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEqual)) return load_Equal(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expDifferent)) return load_Different(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreater)) return load_Greater(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expGreaterEqual)) return load_GreaterEqual(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesser)) return load_Lesser(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLesserEqual)) return load_LesserEqual(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expIRIOf)) return load_IRIOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expLengthOf)) return load_LengthOf(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.DataPropertyExpression loadDataPropExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
           return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Data Property expressions
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.owl2.ObjectPropertyExpression loadObjPropExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Object Property expressions
        if (name.equals(xowl.interpreter.frontends.VocOWL2.expObjectInverseOf)) return load_ObjectInverseOf(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.actions.FunctionExpression loadFunctionExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.IRI)
            return load_EntityReference(loader, (FIRINode)node, context);
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Entity expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expNewEntity)) return load_NewEntity(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expEntityForIRI)) return load_EntityForIRI(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.actions.ExecutableExpression loadExecutableExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValueOf)) return load_ValueOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Executable expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expLambda)) return load_Lambda(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.actions.ArrayExpression loadArrayExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        if (node.getType() == FNodeType.QueryVar)
            return load_QueryVariable(loader, (FQueryVar)node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expValuesOf)) return load_ValuesOf(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expQueryVariable)) return load_QueryVariable(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Array expressions
        if (name.equals(xowl.interpreter.frontends.VocActions.expArray)) return load_Array(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expConcat)) return load_Concat(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expSlice)) return load_Slice(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }
    public static xowl.lang.interop.JavaObjectExpression loadJavaObjectExp(Loader loader, FNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        if (node.getType() == FNodeType.CodeVar)
            return VariableLoader.load(node, context);
        FElementNode elemNode = (FElementNode)node;
        String name = elemNode.getName();
        // Multiple classification
        if (name.equals(xowl.interpreter.frontends.VocActions.expInvoke)) return load_Invoke(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expExecute)) return load_Execute(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expCodeVariable)) return VariableLoader.load(elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocActions.expArrayElement)) return load_ArrayElement(loader, elemNode, context);
        // Java object expressions
        if (name.equals(xowl.interpreter.frontends.VocInterop.expJavaInvokation)) return load_JavaInvokation(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expNewObject)) return load_NewObject(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expObjectField)) return load_ObjectField(loader, elemNode, context);
        if (name.equals(xowl.interpreter.frontends.VocInterop.expStaticField)) return load_StaticField(loader, elemNode, context);
        return null;
    }



    private static xowl.lang.owl2.IRI load_EntityReference(Loader loader, FIRINode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        return loader.getIRI(node.getIRI());
    }



    // Multiple classification
    public static xowl.lang.actions.Invoke load_Invoke(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Invoke expression = new xowl.lang.actions.Invoke();
        expression.setFunction(loadFunctionExp(loader, node.getChildren().get(0), context));
        if (node.getChildren().size() == 1)
            return expression;
        if (isToSeqNode(node.getChildren().get(1))) {
            expression.setValueSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(1), context));
        } else {
            List<xowl.lang.owl2.Expression> exps = new ArrayList<xowl.lang.owl2.Expression>();
            for (int i=1; i!=node.getChildren().size(); i++) {
                xowl.lang.owl2.Expression temp = load(loader, node.getChildren().get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setValueSeq(xowl.interpreter.impl.Sequences.toSequence_Exp(exps));
        }
        return expression;
    }
    public static xowl.lang.actions.Execute load_Execute(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Execute expression = new xowl.lang.actions.Execute();
        expression.setExecutes(loadExecutableExp(loader, node.getChildren().get(0), context));
        if (node.getChildren().size() == 1)
            return expression;
        if (isToSeqNode(node.getChildren().get(1))) {
            expression.setValueSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(1), context));
        } else {
            List<xowl.lang.owl2.Expression> exps = new ArrayList<xowl.lang.owl2.Expression>();
            for (int i=1; i!=node.getChildren().size(); i++) {
                xowl.lang.owl2.Expression temp = load(loader, node.getChildren().get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setValueSeq(xowl.interpreter.impl.Sequences.toSequence_Exp(exps));
        }
        return expression;
    }
    private static xowl.lang.actions.Contains load_Contains(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Contains expression = new xowl.lang.actions.Contains();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        for (int i=0; i!=node.getChildren().size(); i++)
            expression.addAxioms(AxiomLoader.load(loader, (FElementNode)node.getChildren().get(i), innerContext));
        return expression;
    }
    private static xowl.lang.actions.ValuesOf load_ValuesOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.ValuesOf expression = new xowl.lang.actions.ValuesOf();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        xowl.lang.actions.QueryVariable var = null;
        if (node.getChildren().get(0).getType() == FNodeType.QueryVar)
            var = load_QueryVariable(loader, (FQueryVar)node.getChildren().get(0),innerContext);
        else
            var = load_QueryVariable(loader, (FElementNode)node.getChildren().get(0),innerContext);
        expression.setOn(var);
        for (int i=1; i!=node.getChildren().size(); i++) {
            xowl.lang.owl2.LiteralExpression exp = ExpressionLoader.loadLiteralExp(loader, node.getChildren().get(i), innerContext);
            if (exp != null)
                expression.addGuards(exp);
            else
                expression.addAxioms(AxiomLoader.load(loader, (FElementNode)node.getChildren().get(i), innerContext));
        }
        return expression;
    }
    private static xowl.lang.actions.ValueOf load_ValueOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.ValueOf expression = new xowl.lang.actions.ValueOf();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        xowl.lang.actions.QueryVariable var = null;
        if (node.getChildren().get(0).getType() == FNodeType.QueryVar)
            var = load_QueryVariable(loader, (FQueryVar)node.getChildren().get(0),innerContext);
        else
            var = load_QueryVariable(loader, (FElementNode)node.getChildren().get(0),innerContext);
        expression.setOn(var);
        for (int i=1; i!=node.getChildren().size(); i++) {
            xowl.lang.owl2.LiteralExpression exp = ExpressionLoader.loadLiteralExp(loader, node.getChildren().get(i), innerContext);
            if (exp != null)
                expression.addGuards(exp);
            else
                expression.addAxioms(AxiomLoader.load(loader, (FElementNode)node.getChildren().get(i), innerContext));
        }
        return expression;
    }
    
    private static xowl.lang.actions.QueryVariable load_QueryVariable(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        String var = ((FLiteralNode)node.getChildren().get(0)).getLexicalForm();
        return context.resolveQuery(var);
    }
    private static xowl.lang.actions.QueryVariable load_QueryVariable(Loader loader, FQueryVar node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        String var = node.getValue();
        return context.resolveQuery(var);
    }
    private static xowl.lang.actions.ArrayElement load_ArrayElement(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.ArrayElement expression = new xowl.lang.actions.ArrayElement();
        expression.setArray(loadArrayExp(loader, node.getChildren().get(0), context));
        expression.setIndex(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }



    // Entity expressions
    private static xowl.lang.owl2.EntityExpression load_NewEntity(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.NewEntity expression = new xowl.lang.actions.NewEntity();
        expression.setIri(loadLiteralExp(loader, node.getChildren().get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.EntityExpression load_EntityForIRI(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.EntityForIRI expression = new xowl.lang.actions.EntityForIRI();
        expression.setIri(loadLiteralExp(loader, node.getChildren().get(0), context));
        return expression;
    }



    // Class expressions
    private static xowl.lang.owl2.ClassExpression load_ObjectComplementOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectComplementOf expression = new xowl.lang.owl2.ObjectComplementOf();
        expression.setClasse(loadClassExp(loader, node.getChildren().get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectIntersectionOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectIntersectionOf expression = new xowl.lang.owl2.ObjectIntersectionOf();
        if (node.getChildren().isEmpty())
            return expression;
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setClassSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.ClassExpression> exps = new ArrayList<xowl.lang.owl2.ClassExpression>();
            for (FNode child : node.getChildren()) {
                xowl.lang.owl2.ClassExpression temp = loadClassExp(loader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setClassSeq(xowl.interpreter.impl.Sequences.toSequence_Class(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectOneOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectOneOf expression = new xowl.lang.owl2.ObjectOneOf();
        if (node.getChildren().isEmpty())
            return expression;
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setIndividualSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.IndividualExpression> exps = new ArrayList<xowl.lang.owl2.IndividualExpression>();
            for (FNode child : node.getChildren()) {
                xowl.lang.owl2.IndividualExpression temp = loadIndividualExp(loader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setIndividualSeq(xowl.interpreter.impl.Sequences.toSequence_Ind(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectUnionOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectUnionOf expression = new xowl.lang.owl2.ObjectUnionOf();
        if (node.getChildren().isEmpty())
            return expression;
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setClassSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.ClassExpression> exps = new ArrayList<xowl.lang.owl2.ClassExpression>();
            for (FNode child : node.getChildren()) {
                xowl.lang.owl2.ClassExpression temp = loadClassExp(loader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setClassSeq(xowl.interpreter.impl.Sequences.toSequence_Class(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataAllValuesFrom(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataAllValuesFrom expression = new xowl.lang.owl2.DataAllValuesFrom();
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setDataPropertySeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.DataPropertyExpression> exps = new ArrayList<xowl.lang.owl2.DataPropertyExpression>();
            for (int i=0; i!=node.getChildren().size()-1; i++) {
                xowl.lang.owl2.DataPropertyExpression temp = ExpressionLoader.loadDataPropExp(loader, node.getChildren().get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setDataPropertySeq(xowl.interpreter.impl.Sequences.toSequence_DataProp(exps));
        }
        expression.setDatarange(loadDatarangeExp(loader, node.getChildren().get(node.getChildren().size()-1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataExactCardinality(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataExactCardinality expression = new xowl.lang.owl2.DataExactCardinality();
        expression.setCardinality(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setDataProperty(loadDataPropExp(loader, node.getChildren().get(1), context));
        if (node.getChildren().size() >= 3)
            expression.setDatarange(loadDatarangeExp(loader, node.getChildren().get(2), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataHasValue(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataHasValue expression = new xowl.lang.owl2.DataHasValue();
        expression.setDataProperty(loadDataPropExp(loader, node.getChildren().get(0), context));
        expression.setLiteral(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataMaxCardinality(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataMaxCardinality expression = new xowl.lang.owl2.DataMaxCardinality();
        expression.setCardinality(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setDataProperty(loadDataPropExp(loader, node.getChildren().get(1), context));
        if (node.getChildren().size() >= 3)
            expression.setDatarange(loadDatarangeExp(loader, node.getChildren().get(2), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataMinCardinality(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataMinCardinality expression = new xowl.lang.owl2.DataMinCardinality();
        expression.setCardinality(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setDataProperty(loadDataPropExp(loader, node.getChildren().get(1), context));
        if (node.getChildren().size() >= 3)
            expression.setDatarange(loadDatarangeExp(loader, node.getChildren().get(2), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_DataSomeValuesFrom(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataSomeValuesFrom expression = new xowl.lang.owl2.DataSomeValuesFrom();
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setDataPropertySeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.DataPropertyExpression> exps = new ArrayList<xowl.lang.owl2.DataPropertyExpression>();
            for (int i=0; i!=node.getChildren().size()-1; i++) {
                xowl.lang.owl2.DataPropertyExpression temp = ExpressionLoader.loadDataPropExp(loader, node.getChildren().get(i), context);
                if (temp != null) exps.add(temp);
            }
            expression.setDataPropertySeq(xowl.interpreter.impl.Sequences.toSequence_DataProp(exps));
        }
        expression.setDatarange(loadDatarangeExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectAllValuesFrom(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectAllValuesFrom expression = new xowl.lang.owl2.ObjectAllValuesFrom();
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(0), context));
        expression.setClasse(loadClassExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectExactCardinality(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectExactCardinality expression = new xowl.lang.owl2.ObjectExactCardinality();
        expression.setCardinality(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(1), context));
        if (node.getChildren().size() >= 3)
            expression.setClasse(loadClassExp(loader, node.getChildren().get(2), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectHasSelf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectHasSelf expression = new xowl.lang.owl2.ObjectHasSelf();
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectHasValue(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectHasValue expression = new xowl.lang.owl2.ObjectHasValue();
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(0), context));
        expression.setIndividual(loadIndividualExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectMaxCardinality(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectMaxCardinality expression = new xowl.lang.owl2.ObjectMaxCardinality();
        expression.setCardinality(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(1), context));
        if (node.getChildren().size() >= 3)
            expression.setClasse(loadClassExp(loader, node.getChildren().get(2), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectMinCardinality(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectMinCardinality expression = new xowl.lang.owl2.ObjectMinCardinality();
        expression.setCardinality(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(1), context));
        if (node.getChildren().size() >= 3)
            expression.setClasse(loadClassExp(loader, node.getChildren().get(2), context));
        return expression;
    }
    private static xowl.lang.owl2.ClassExpression load_ObjectSomeValuesFrom(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectSomeValuesFrom expression = new xowl.lang.owl2.ObjectSomeValuesFrom();
        expression.setObjectProperty(loadObjPropExp(loader, node.getChildren().get(0), context));
        expression.setClasse(loadClassExp(loader, node.getChildren().get(1), context));
        return expression;
    }



    // Datatype expressions
    private static xowl.lang.owl2.Datarange load_DataComplementOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataComplementOf expression = new xowl.lang.owl2.DataComplementOf();
        expression.setDatarange(loadDatarangeExp(loader, node.getChildren().get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DataIntersectionOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataIntersectionOf expression = new xowl.lang.owl2.DataIntersectionOf();
        if (node.getChildren().isEmpty())
            return expression;
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setDatarangeSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.Datarange> exps = new ArrayList<xowl.lang.owl2.Datarange>();
            for (FNode child : node.getChildren()) {
                xowl.lang.owl2.Datarange temp = loadDatarangeExp(loader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setDatarangeSeq(xowl.interpreter.impl.Sequences.toSequence_Datatype(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DataOneOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataOneOf expression = new xowl.lang.owl2.DataOneOf();
        if (node.getChildren().isEmpty())
            return expression;
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setLiteralSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.LiteralExpression> exps = new ArrayList<xowl.lang.owl2.LiteralExpression>();
            for (FNode child : node.getChildren()) {
                xowl.lang.owl2.LiteralExpression temp = loadLiteralExp(loader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setLiteralSeq(xowl.interpreter.impl.Sequences.toSequence_Lit(exps));
        }
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DatatypeRestriction(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DatatypeRestriction expression = new xowl.lang.owl2.DatatypeRestriction();
        return expression;
    }
    private static xowl.lang.owl2.Datarange load_DataUnionOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.DataUnionOf expression = new xowl.lang.owl2.DataUnionOf();
        if (node.getChildren().isEmpty())
            return expression;
        if (isToSeqNode(node.getChildren().get(0))) {
            expression.setDatarangeSeq(load_ToSeq(loader, (FElementNode)node.getChildren().get(0), context));
        } else {
            List<xowl.lang.owl2.Datarange> exps = new ArrayList<xowl.lang.owl2.Datarange>();
            for (FNode child : node.getChildren()) {
                xowl.lang.owl2.Datarange temp = loadDatarangeExp(loader, child, context);
                if (temp != null) exps.add(temp);
            }
            expression.setDatarangeSeq(xowl.interpreter.impl.Sequences.toSequence_Datatype(exps));
        }
        return expression;
    }



    // Individual expression
    public static xowl.lang.owl2.AnonymousIndividual load_AnonymousIndividual(Loader loader, FNodeIDNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        return loader.resolveAnonymousIndividual(node.getID());
    }
    private static xowl.lang.owl2.IndividualExpression load_NewIndividual(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.NewIndividual expression = new xowl.lang.actions.NewIndividual();
        return expression;
    }



    // Literal expressions
    public static xowl.lang.owl2.Literal load_Literal(Loader loader, FLiteralNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.Literal expression = new xowl.lang.owl2.Literal();
        expression.setLexicalValue(node.getLexicalForm());
        expression.setMemberOf(loader.getIRI(node.getDatatypeIRI()));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Plus(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Plus expression = new xowl.lang.actions.Plus();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Minus(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Minus expression = new xowl.lang.actions.Minus();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Mult(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Mult expression = new xowl.lang.actions.Mult();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Divide(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Divide expression = new xowl.lang.actions.Divide();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Modulus(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Modulus expression = new xowl.lang.actions.Modulus();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BAnd(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.BAnd expression = new xowl.lang.actions.BAnd();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BOr(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.BOr expression = new xowl.lang.actions.BOr();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BXOr(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.BXOr expression = new xowl.lang.actions.BXOr();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_BNot(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.BNot expression = new xowl.lang.actions.BNot();
        expression.setExpression(loadLiteralExp(loader, node.getChildren().get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Equal(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Equal expression = new xowl.lang.actions.Equal();
        expression.setLhs(load(loader, node.getChildren().get(0), context));
        expression.setRhs(load(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Different(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Different expression = new xowl.lang.actions.Different();
        expression.setLhs(load(loader, node.getChildren().get(0), context));
        expression.setRhs(load(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Greater(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Greater expression = new xowl.lang.actions.Greater();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_GreaterEqual(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.GreaterEqual expression = new xowl.lang.actions.GreaterEqual();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_Lesser(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Lesser expression = new xowl.lang.actions.Lesser();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_LesserEqual(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.LesserEqual expression = new xowl.lang.actions.LesserEqual();
        expression.setLhs(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setRhs(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_IRIOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.IRIOf expression = new xowl.lang.actions.IRIOf();
        expression.setEntity(loadEntityExp(loader, node.getChildren().get(0), context));
        return expression;
    }
    private static xowl.lang.owl2.LiteralExpression load_LengthOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.LengthOf expression = new xowl.lang.actions.LengthOf();
        expression.setArray(loadArrayExp(loader, node.getChildren().get(0), context));
        return expression;
    }


    // Object Property expressions
    private static xowl.lang.owl2.ObjectPropertyExpression load_ObjectInverseOf(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.owl2.ObjectInverseOf expression = new xowl.lang.owl2.ObjectInverseOf();
        expression.setInverse(loadObjPropExp(loader, node.getChildren().get(0), context));
        return expression;
    }


    // Executable expressions
    private static xowl.lang.actions.ExecutableExpression load_Lambda(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Lambda expression = new xowl.lang.actions.Lambda();
        xowl.interpreter.frontends.LexicalContext innerContext = new xowl.interpreter.frontends.LexicalContext(context);
        if (context != null) {
            for (xowl.lang.actions.CodeVariable free : context.getCodeVariables())
                expression.addFreeVars(free);
        }
        for (FNode child : node.getChildren()) {
            xowl.lang.actions.CodeVariable var = VariableLoader.load(child, innerContext);
            if (var != null)
                expression.addBoundVars(var);
            else
                expression.setContains(StatementLoader.load(loader, (FElementNode)child, innerContext));
        }
        return expression;
    }



    // Array expressions
    private static xowl.lang.actions.ArrayExpression load_Array(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Array expression = new xowl.lang.actions.Array();
        int index = 0;
        for (FNode child : node.getChildren()) {
            xowl.lang.owl2.Expression exp = load(loader, child, context);
            if (exp != null) {
                xowl.lang.actions.Element elem = new xowl.lang.actions.Element();
                elem.setElemIndex(index);
                elem.setElemValue(exp);
                expression.addElements(elem);
                index++;
            }
        }
        return expression;
    }
    private static xowl.lang.actions.ArrayExpression load_Concat(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Concat expression = new xowl.lang.actions.Concat();
        int index = 0;
        for (FNode child : node.getChildren()) {
            xowl.lang.owl2.Expression exp = load(loader, child, context);
            if (exp != null) {
                xowl.lang.actions.Element elem = new xowl.lang.actions.Element();
                elem.setElemIndex(index);
                elem.setElemValue(exp);
                expression.addElements(elem);
                index++;
            }
        }
        return expression;
    }
    private static xowl.lang.actions.ArrayExpression load_Slice(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.Slice expression = new xowl.lang.actions.Slice();
        expression.setArray(loadArrayExp(loader, node.getChildren().get(0), context));
        expression.setLowerBound(loadLiteralExp(loader, node.getChildren().get(1), context));
        expression.setUpperBound(loadLiteralExp(loader, node.getChildren().get(2), context));
        return expression;
    }


    // Java Interop expressions
    public static xowl.lang.interop.JavaInvokation load_JavaInvokation(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.interop.JavaInvokation expression = new xowl.lang.interop.JavaInvokation();
        expression.setOn(loadJavaObjectExp(loader, node.getChildren().get(0), context));
        expression.setMethod(loadLiteralExp(loader, node.getChildren().get(1), context));
        for (int i=2; i!=node.getChildren().size(); i++)
            expression.addParams(load(loader, node.getChildren().get(i), context));
        return expression;
    }
    private static xowl.lang.interop.NewObject load_NewObject(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.interop.NewObject expression = new xowl.lang.interop.NewObject();
        expression.setClasse(loadLiteralExp(loader, node.getChildren().get(0), context));
        for (int i=1; i!=node.getChildren().size(); i++)
            expression.addParams(loadJavaObjectExp(loader, node.getChildren().get(i), context));
        return expression;
    }
    private static xowl.lang.interop.ObjectField load_ObjectField(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.interop.ObjectField expression = new xowl.lang.interop.ObjectField();
        expression.setOn(loadJavaObjectExp(loader, node.getChildren().get(0), context));
        expression.setField(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }
    private static xowl.lang.interop.StaticField load_StaticField(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.interop.StaticField expression = new xowl.lang.interop.StaticField();
        expression.setClasse(loadLiteralExp(loader, node.getChildren().get(0), context));
        expression.setField(loadLiteralExp(loader, node.getChildren().get(1), context));
        return expression;
    }


    // Sequence
    public static xowl.lang.actions.ToSeq load_ToSeq(Loader loader, FElementNode node, xowl.interpreter.frontends.LexicalContext context) throws FParserException {
        xowl.lang.actions.ToSeq toseq = new xowl.lang.actions.ToSeq();
        toseq.setArray(loadArrayExp(loader, (FElementNode)node.getChildren().get(0), context));
        return toseq;
    }
    public static boolean isToSeqNode(FNode node) {
        if (!(node instanceof FElementNode))
            return false;
        return ((FElementNode)node).getName().equals(xowl.interpreter.frontends.VocActions.seqToSeq);
    }
}
